<?php
class Admin_Form_Newscat extends Zend_Form{
    
    public function init(){       
        $this->setAction('add');        
        $catname=new Zend_Form_Element_Text('catName');        
        $catname->setRequired(true)->addValidator('NotEmpty')
            ->removeDecorator('HtmlTag')->removeDecorator('Label');
        
        $catcode=new Zend_Form_Element_Text('catCode');                
        $catcode->setRequired(true)->addValidator('NotEmpty')                                  
            ->removeDecorator('HtmlTag')->removeDecorator('Label');        
        
        $ord=new Zend_Form_Element_Text('ord');                
        $ord->removeDecorator('HtmlTag')->removeDecorator('Label');            
            
        $display=new Zend_Form_Element_Checkbox('display');                
        $display->removeDecorator('HtmlTag')->removeDecorator('Label');                           
            
        $sm=new Zend_Form_Element_Button('submit');
        $sm->setAttrib('type','submit')->setAttrib('class','');
        $sm->setLabel('Save')
            ->removeDecorator('dtddwrapper');                                         
        
        $this->setDecorators(array(
                                   array('viewScript',
                                   array('viewScript'=>'/template/form_newscat.phtml'),
                                )));                        
           
        $this->addElements(array($catname,$catcode,$display,$ord,$sm));
        
                                          
    }
}